// app.js

import './utils/utils'
import './utils/http'
App({
  globalData: {},
  onLaunch() { 
    this.getToken()
  },
  getToken() {
    // 读取本地token
    this.token = wx.getStorageSync('token')
    this.refreshToken = wx.getStorageSync('refreshToken')
  },
  // 设置token
  setToken(key, token) {
    // 存储在应用实例中
    this[key] = token
    // 存储在本地存储
    wx.setStorageSync(key,token)

  }
})
